| 9. | Which of the following statements are correct? 1 A switch statement can act on numerical as well as Boolean types. 2 A switch statement can act on characters, strings and enumerations types. 3 We cannot declare variables within a case statement if it is not enclosed by { }. 4 The foreach statement is used to iterate through the collection to get the desired information and should be used to change the contents of the collection to avoid unpredictable side effects. 5 All of the expressions of the for statement are not optional. |
|||||||||
Answer: Option A Explanation: No answer description available for this question. Let us discuss.
|
| 10. | Which of the following statements are correct about the C#.NET code snippet given below? if (age > 18 && no < 11) 1 The condition no < 11 will be evaluated only if age > 18 evaluates to True. 2 The statement a = 25 will get executed if any one condition is True. 3 The condition no < 11 will be evaluated only if age > 18 evaluates to False. 4 The statement a = 25 will get executed if both the conditions are True. 5 && is known as a short circuiting logical operator. |
|||||||||
Answer: Option C Explanation: No answer description available for this question. Let us discuss.
|
| 11. | The C#.NET code snippet given below generates ____ numbers series as output? int i = 1, j = 1, val; |
|||||||||
Answer: Option B Explanation: No answer description available for this question. Let us discuss.
|
| 12. | Which of the following can be used to terminate a while loop and transfer control outside the loop? 1 exit while 2 continue 3 exit statement 4 break 5 goto
|
|||||||||
Answer: Option D Explanation: No answer description available for this question. Let us discuss.
|
| 13. | Which of the following code snippets are the correct way to determine whether a is Odd or Even? 1 int a; 2 int a; 3 int a; 4 int a;
|
|||||||||
Answer: Option B Explanation: No answer description available for this question. Let us discuss.
|
| 14. | Which of the following is the incorrect form of Decision Control instruction? |
|||||||||
Answer: Option C Explanation: No answer description available for this question. Let us discuss.
|
| 15. | What will be the output of the C#.NET code snippet given below? char ch = Convert.ToChar ('a' | 'b' | 'c'); |
|||||||||
Answer: Option Explanation: No answer description available for this question. Let us discuss.
|
| 16. | What will be the output of the C#.NET code snippet given below? int val; |
|||||||||
Answer: Option C Explanation: No answer description available for this question. Let us discuss.
|
